home *** CD-ROM | disk | FTP | other *** search
- property pBoxLocList
- global gCurrentTravelProps, gCurrentBoxInfo, gCurrentBoxSprite, gGuyObj, gLeft, gTop, gRight, gBottom
-
- on new me
- set pBoxLocList to [1: [#start: point(89, 156), #stretchdirection: 1], 2: [#start: point(179, 156), #stretchdirection: 3], 3: [#start: point(179, 29), #stretchdirection: 1], 4: [#start: point(436, 25), #stretchdirection: 4], 5: [#start: point(438, 178), #stretchdirection: 2], 6: [#start: point(353, 178), #stretchdirection: 3], 7: [#start: point(353, 68), #stretchdirection: 2], 8: [#start: point(246, 68), #stretchdirection: 4], 9: [#start: point(246, 180), #stretchdirection: 2], 10: [#start: point(38, 181), #stretchdirection: 4], 11: [#start: point(36, 289), #stretchdirection: 1], 12: [#start: point(178, 289), #stretchdirection: 3], 13: [#start: point(178, 210), #stretchdirection: 1], 14: [#start: point(327, 212), #stretchdirection: 4], 15: [#start: point(327, 282), #stretchdirection: 1], 16: [#start: point(382, 279), #stretchdirection: 3], 17: [#start: point(385, 201), #stretchdirection: 1]]
- return me
- end
-
- on mUpdateBoxes me
- if the pPreviousPosInList of gGuyObj < the pPosInTravelList of gGuyObj then
- set gCurrentBoxSprite to 10 + the pPosInTravelList of gGuyObj
- set gCurrentBoxInfo to getAt(pBoxLocList, the pPosInTravelList of gGuyObj)
- case the pPosInTravelList of gGuyObj of
- 17:
- set the width of sprite gCurrentBoxSprite to 21
- set the height of sprite gCurrentBoxSprite to 30
- otherwise:
- set the width of sprite gCurrentBoxSprite to 21
- set the height of sprite gCurrentBoxSprite to 21
- end case
- updateStage()
- set the loc of sprite gCurrentBoxSprite to getAt(gCurrentBoxInfo, 1)
- updateStage()
- set the pPreviousPosInList of gGuyObj to the pPosInTravelList of gGuyObj
- set vBoxRect to the rect of sprite gCurrentBoxSprite
- set gLeft to getAt(vBoxRect, 1)
- set gTop to getAt(vBoxRect, 2)
- set gRight to getAt(vBoxRect, 3)
- set gBottom to getAt(vBoxRect, 4)
- end if
- case getAt(gCurrentBoxInfo, 2) of
- 1:
- set the rect of sprite gCurrentBoxSprite to rect(gLeft, gTop, the locH of sprite 40 + 5, gBottom)
- 2:
- set the rect of sprite gCurrentBoxSprite to rect(the locH of sprite 40 - 10, gTop, gRight, gBottom)
- 3:
- set the rect of sprite gCurrentBoxSprite to rect(gLeft, the locV of sprite 40 - 8, gRight, gBottom)
- 4:
- set the rect of sprite gCurrentBoxSprite to rect(gLeft, gTop, gRight, the locV of sprite 40 + 5)
- end case
- updateStage()
- end
-